package com.itlong.cloud.project.property;

import com.itlong.cloud.POJO.DTO.common.NettyServiceDTO;
import com.itlong.cloud.POJO.DTO.property.CalculateCostsDTO;
import com.itlong.cloud.POJO.DTO.property.CarIssueDTO;
import com.itlong.cloud.POJO.DTO.property.PaymentParkingCostsDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.io.IOException;

/**
 * <desc>
 *      暴露操作netty通道接口Feign代理接口
 * </desc>
 *
 * @createDate 2018/11/12
 */
@FeignClient(name = "project-service")
public interface IParkCarHttpServiceClient {

    /**
     * <desc>
     *      停车算费
     * </desc>
     *
     * @param dto
     * @return 金额
     * @author Jiaqi.X
     * @createDate 2018/11/11
     */
    @RequestMapping(path="/property/parkCarHttp/queryParkCarFee",method = {RequestMethod.POST})
    NettyServiceDTO queryParkCarFee(@RequestBody CalculateCostsDTO dto) throws IOException;


    /**
     * <desc>
     *      月卡续费
     * </desc>
     *
     * @param dto
     * @return
     * @author Jiaqi.X
     * @createDate 2018/11/12
     */
    @RequestMapping(path="/property/parkCarHttp/carIssue",method = {RequestMethod.POST})
    public NettyServiceDTO carIssue(@RequestBody CarIssueDTO dto) throws IOException;

    /**
     * <desc>
     *      缴费通知
     * </desc>
     *
     * @param dto
     * @return
     * @author Jiaqi.X
     * @createDate 2018/11/12
     */
    @PostMapping(path="/property/parkCarHttp/paymentParkFee")
    NettyServiceDTO paymentParkFee(@RequestBody PaymentParkingCostsDTO dto) throws IOException;
}
